package com.smit.common;

import java.util.HashMap;

/**
 * 应用数据参数
 */
public final class AppData {
    /** SDK 版本名 */
    public static final String SDK_VERSION_NAME = "QiShi"; //TaiChi QiShi
    /** SDK 版本号 */
    public static final int SDK_VERSION_CODE = 1;
    /** SDK API Level  */
    public static final int SDK_API_LEVEL = 1;
    /** SDK Revision */
    public static final int SDK_API_REVISION = 1;

    /** share preference 文件名 */
    public static final String PREF_SHARE_NAME = "icast_sdk";
    /** 主机类型id */
    public static final String PREF_HOST_TYPE_ID = "host_type_id";
    /** 主机类型name */
    public static final String PREF_HOST_TYPE_NAME = "host_type_name";
    /** 用于MD5加密的key */
    public static final String APIK_KEY_PREFIX = "usbcam@smit";
    /** DVB 运营商网络名 */
    public static final String PREF_DVB_NETWORK_NAME = "dvb_network_name";
    /** 之前版本保存为int类型，现在为string，名字改了，否则启动会崩溃 */
    public static final String PREF_DVB_NETWORK_ID = "dvb_network_id2";
    /** 用在出现同样的运营商和网络ID的时候区分不同地方的*/
    public static final String PREF_DVB_MAGIC_ID = "dvb_magic_id";

    /** 保存鉴权码 */
    public static final String PREF_APIK = "apik";
    /** 设备ID */
    public static final String PREF_DEVICE_ID = "device_id";
    /** 设备类型 */
    public static final String PREF_DEVICE_TYPE = "device_type";
    /** 鉴权认证 */
    public static final String PREF_BIND_OPERATOR_OK = "bind_operator_ok";

    /** 主机类型ID */
    public static int hostTypeId = 0;
    /** 主机类型名称 */
    public static String hostTypeName = "";
    /** 服务商ID */
    public static int providerId = 0;
    /** 服务商名称 */
    public static String providerName = "";

    private static HashMap<String, String> appKeyMap;

    private AppData() { }
    /**
     * 获取app keys
     * @return key map
     */
    public static synchronized HashMap<String, String> getKeyMap() {
        if (appKeyMap != null) {
            return appKeyMap;
        }
        appKeyMap = new HashMap<String, String>();
        appKeyMap.put("icast", "icast_test_key");
        appKeyMap.put("10112016", "5067da30977b2219");
        appKeyMap.put("10012015", "ce7b95fbed671852");
        appKeyMap.put("10022015", "d2b41a0acc45d481");
        appKeyMap.put("10032015", "9065f68caf9a9442");
        appKeyMap.put("10042015", "2f1c59de02c823f6");
        appKeyMap.put("10052015", "48487401741fa732");
        appKeyMap.put("10062015", "56fb3bcd4fbcf34c");
        appKeyMap.put("10072015", "e013f4a32ae6b894");
        appKeyMap.put("10082015", "aaaa8fab8d12e191");
        appKeyMap.put("10092015", "5d03f2044159f561");
        appKeyMap.put("10102015", "9d4e0a4995249735");
        appKeyMap.put("20012015", "f4b87ed965c65d1d");
        appKeyMap.put("20022015", "b529b18c55b01bde");
        appKeyMap.put("20032015", "03192077a10976c1");
        appKeyMap.put("20042015", "38e04cd3f418156e");
        appKeyMap.put("20052015", "9cc9ae39a690a7e2");
        appKeyMap.put("20062015", "c565eec2c1f7baf8");
        appKeyMap.put("20072015", "d5a5c96c17ed9027");
        appKeyMap.put("20082015", "dc9a22890322d20f");
        appKeyMap.put("20092015", "3c74f19f7b2f1de1");
        appKeyMap.put("20102015", "340d2b5d809b9721");
        return appKeyMap;
    }

}
